<? include("function.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Perfect Back Office</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="../js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../js/myajax.js"></script>

<link rel="stylesheet" href="../css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
<script src="../js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="header">
	<!--<div id="logo">
            <h1><a href="../" target="_blank">Hap@dvisor</a></h1>
          <p><em><span style="color:#F60">Back office develop by <b style="text-transform:none">Aum</b></span><a href="#/"><br/><span style="color:#CC6600">version 9.6</span></a></em></p>
        </div>-->
	<div id="menu">
		<ul>
			<li class="current_page_item"><a href="?body=" class="first">หน้าแรก</a></li>
			<li><a href="verify.php?logout=1" onclick="javascript:if(confirm('Are you sure you want to Logout')){return true;} else{return false;}" >ออกจากระบบ</a></li>
            <li></li>
		</ul>
        <a>ยินดีต้อนรับ <?=$_SESSION['admin_user']?></a>
        
	</div>
	<!-- end #menu -->
	<div id="search">
		<form method="get" action="">
			<fieldset>
				<!--<input type="text" name="s" id="search-text" size="15" />-->
			</fieldset>
		</form>
	</div>
	<!-- end #search -->
    
</div>
<!-- end #header -->
<!-- end #header-wrapper -->
<div style = "clear:both">
<hr />
<!-- end #logo -->
<div id="page">
	
	<!-- end #content -->
	<div id="sidebar">
		<ul>
        
        
			<li>
				<h2>Order  & Customer  </h2>
				<ul>
					<li><a href="?body=order&status=0">Order Comming</a></li>
				</ul>
				<ul>
					<li><a href="?body=order&status=1">Order Accepted</a></li>
				</ul>
				<ul>
					<li><a href="?body=customer">Customer</a></li>
				</ul>
				<ul>
					<li><a href="?body=sendemail">Send Email to Customer</a></li>
				</ul>
		  </li>
        
		<li>
				<h2>Product  </h2>
				
				<ul>
					<li><a href="?body=cate">Category</a></li>
				</ul>
				<ul>
					<li><a href="?body=product">Product</a></li>
				</ul>
		  </li>
        
			<li>
				<h2>Comment  <a href = "./home.php?body=cment"><span style="float:right;color:#FFF;padding-right:10px;font-size:16px"><img src = "./images/addedit-swap.png" style="width:20px;height:20px;" /></span></a></h2>
				<ul>
					<?
						if($_SERVER['HTTP_HOST'] == "localhost"){
							$host = 	$_SERVER['HTTP_HOST']."/subkamol";
						}else{
							$host =	 $_SERVER['HTTP_HOST'];
						}
                        $cment = Q2("select * from post_comment pc
                        inner join product p on p.pd_id = pc.post_id
						left join images i on i.na_id = p.pd_id
						where pc.pauthor = 0 
                        order by pc.pcomment_update DESC , pc.ampm DESC limit 5");
                        $i = 1;
                        foreach($cment as $c){
                    ?>
                             <li>
                                    <a  href = "http://<?=$host."/index.php?pd_id=".$c['pd_id']."&img_id=".$c['img_id']?>" target="_new"><?=$c["pcomment_update"]." : ".$c["pd_name"]." / ".$c["pd_name2"]?></a>
                             </li>
                     <?
                            $i++;
                        }
                     ?>
                </ul>
		  </li>
          
          
          
          <li>
				<h2>Page Views  <a href = "./home.php?body=pview"><span style="float:right;color:#FFF;padding-right:10px;font-size:16px"><img src = "./images/addedit-swap.png" style="width:20px;height:20px;" /></span></a></h2>
				
		  </li>
          
          
          
  
        
			<li>
				<h2>Menu  <a href = "./home.php?body=add-topmenu"><span style="float:right;color:#FFF;padding-right:10px;font-size:16px"><img src = "./images/addedit-swap.png" style="width:20px;height:20px;" /></span></a></h2>
                <?
                $menu1 = Q2("select * from module where md_function like '%publish|%' order by md_order DESC ");
				foreach($menu1 as $menu2)
				{
				?>
				<ul>
					<li><a href="?body=menu&md_id=<?=$menu2['md_id']?>"><?=$menu2['md_name']?> / <?=$menu2['md_name2']?></a></li>
				</ul>
                <?
                }
				?>
				
		  </li>
          
          
          
          <li>
				<h2>Topic  </h2>
				
                <ul>
					<li><a href="?body=sidebardes">Sidebar topic</a></li>
				</ul>
                
				<ul>
					<li><a href="?body=topic">Manage topic</a></li>
				</ul>
		  </li>
          
                  
			<li>
				<h2>Module</h2>
				<ul>
					<li><a href="home.php?body=addpic&na_id=99&tables=firstslide">Images slide fontpage</a></li>
			  	</ul>
                <ul>
					<li><a href="home.php?body=addpicbannerslide&na_id=99&tables=promoslide">Images slide banner page</a></li>
			  	</ul>
				<ul>
					<li><a href="?body=module">Module Setting</a></li>
			  	</ul>
				<ul>
					<li><a href="?body=link">Link Setting</a></li>
			  	</ul>
				<ul>
					<li><a href="?body=setting">Frontpage Setting</a></li>
			 	</ul>
                <ul>
					<li><a href="?body=faviconsetting">Favicon Setting</a></li>
			  </ul>
				<ul>
					<li><a href="?body=logosetting">Logo Setting</a></li>
			  </ul>
              <ul>
					<li><a href="?body=bgheader">Background Header Setting</a></li>
			  </ul>
              <ul>
					<li><a href="?body=logofootersetting">Logo Footer Setting</a></li>
			  </ul>
			  <ul>
					<li><a href="?body=langsetting">Language Setting</a></li>
			  </ul>
		  </li>


		  
                  
			<li>
				<h2>Change password</h2>
				<ul>
					<li><a href="?body=userpass">Change password</a></li>
			  </ul>
		  </li>
          
          
		</ul>
  </div>
  <div id="contentx">
		<div id="content-bgtop">
			<div id="content-bgbtm">
			  <div class="post">


					<?  include("body-".$_REQUEST['body'].".php"); ?>



			  </div>
			</div>
		</div>
	</div>
<div style="clear: both;">&nbsp;</div>
	<!-- end #page -->
	<div id="footer">
		<p>Copyright (c) 2010.</p>
	</div>
	<!-- end #footer -->
</div>
</body>
</html>
<script type="text/javascript">
	function prettyPhoto(){ 
			$(".gallery a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
	}
	$("a[rel^='prettyPhoto']").prettyPhoto({
		animationSpeed: 'normal', /* &#3621;&#3633;&#3585;&#3625;&#3603;&#3632;&#3585;&#3634;&#3619;&#3649;&#3626;&#3604;&#3591;&#3649;&#3629;&#3609;&#3636;&#3648;&#3617;&#3594;&#3633;&#3656;&#3609; fast/slow/normal */
		padding: 40, /* &#3585;&#3635;&#3627;&#3609;&#3604;&#3619;&#3632;&#3618;&#3632;&#3627;&#3656;&#3634;&#3591;&#3619;&#3632;&#3627;&#3623;&#3656;&#3634;&#3591;&#3619;&#3641;&#3611;&#3616;&#3634;&#3614;&#3585;&#3633;&#3610;&#3605;&#3633;&#3623;&#3610;&#3657;&#3629;&#3585; */
		opacity: 0.35, /* &#3585;&#3635;&#3627;&#3609;&#3604;&#3588;&#3656;&#3634;&#3588;&#3623;&#3634;&#3617;&#3650;&#3611;&#3619;&#3656;&#3591;&#3649;&#3626;&#3591;  0 - 1 */
		showTitle: true, /* &#3585;&#3635;&#3627;&#3609;&#3604;&#3651;&#3627;&#3657;&#3649;&#3626;&#3604;&#3591; title &#3627;&#3619;&#3639;&#3629;&#3652;&#3617;&#3656; true/false */
		allowresize: true, /* &#3629;&#3609;&#3640;&#3597;&#3634;&#3605;&#3636;&#3651;&#3627;&#3657;&#3618;&#3641;&#3626;&#3648;&#3595;&#3656;&#3629;&#3619;&#3660;&#3618;&#3656;&#3629;&#3627;&#3619;&#3639;&#3629;&#3586;&#3618;&#3634;&#3618;&#3627;&#3619;&#3639;&#3629;&#3652;&#3617;&#3656; true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'facebook' /* &#3608;&#3637;&#3617; light_rounded / dark_rounded / light_square / dark_square */
	});
</script>
